<%@ include file="../common/top.jsp"%>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript"></script>
<h3>Account Information</h3>

<div id="BackLink">
    <a href="cartForm">Get to My Cart</a>
</div>
<div id="BackLink">
    <a href="newOrderForm">Get to My Order</a>
</div>

<div style="display: flex; justify-content: center; align-items: center;">
    <form action="updateaccount">

        <table>
            <tr>
                <td>First name:</td>
                <td>
                    <%--<input type="text" name="account.firstName">--%>
                    <input type="text" name="account.firstName" value="${sessionScope.loginAccount.firstName}" id="first_name">
                    <%--${sessionScope.loginAccount.firstName}--%>
                </td>
                <div id="first_name_feedback"></div>
            </tr>
            <tr>
                <td>Last name:</td>
                <td>
                    <input type="text" name="account.lastName" value="${sessionScope.loginAccount.lastName}">
                    <%--${sessionScope.loginAccount.lastName}--%>
                </td>
            </tr>
            <tr>
                <td>Email:</td>
                <td>
                    <input type="text" size="40" name="account.email" value=" ${sessionScope.loginAccount.email}">
                    <%-- ${sessionScope.loginAccount.email}--%>
                </td>
            </tr>
            <tr>
                <td>Phone:</td>
                <td>
                    <input type="text" name="account.phone" value="${sessionScope.loginAccount.phone}">
                    <%--${sessionScope.loginAccount.phone}--%>
                </td>
            </tr>
            <tr>
                <td>Address 1:</td>
                <td>
                    <input type="text" size="40" name="account.address1" value="${sessionScope.loginAccount.address1}">
                    <%--${sessionScope.loginAccount.address1}--%>
                </td>
            </tr>
            <tr>
                <td>Address 2:</td>
                <td>
                    <input type="text" size="40" name="account.address2" value="${sessionScope.loginAccount.address2}">
                    <%--${sessionScope.loginAccount.address2}--%>
                </td>
            </tr>
            <tr>
                <td>City:</td>
                <td>
                    <input type="text" name="account.city" value="${sessionScope.loginAccount.city}">
                    <%--${sessionScope.loginAccount.city}--%>
                </td>
            </tr>
            <tr>
                <td>State:</td>
                <td>
                    <input type="text" size="4" name="account.state" value="${sessionScope.loginAccount.state}">
                    <%--${sessionScope.loginAccount.state}--%>
                </td>
            </tr>
            <tr>
                <td>Zip:</td>
                <td>
                    <input type="text" size="10" name="account.zip" value="${sessionScope.loginAccount.zip}">
                    <%--${sessionScope.loginAccount.zip}--%>
                </td>
            </tr>
            <tr>
                <td>Country:</td>
                <td>
                    <input type="text" size="15" name="account.country" value="${sessionScope.loginAccount.country}">
                    <%--${sessionScope.loginAccount.country}--%>
                </td>
            </tr>
        </table>

        <input type="submit"  value="UPDATE">
    </form>


</div>



<%--暂时注释以实现页面美观
<h3>Profile Information</h3>

<div style="display: flex; justify-content: center; align-items: center;">
    <table>
        <tr>
            <td>Language Preference:</td>
            <td><stripes:select name="account.languagePreference">
                <stripes:options-collection collection="${actionBean.languages}" />
            </stripes:select></td>
        </tr>
        <tr>
            <td>Favourite Category:</td>
            <td><stripes:select name="account.favouriteCategoryId">
                <stripes:options-collection collection="${actionBean.categories}" />
            </stripes:select></td>
        </tr>
        <tr>
            <td>Enable MyList</td>
            <td><stripes:checkbox name="account.listOption" /></td>
        </tr>
        <tr>
            <td>Enable MyBanner</td>
            <td><stripes:checkbox name="account.bannerOption" /></td>
        </tr>

    </table>
</div>
--%>

<%@ include file="../common/bottom.jsp"%>